package ${package.Controller}.swagger;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List;
import ${package.Entity}.${entity};

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import org.springframework.validation.annotation.Validated;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
/**
* <p>
    * ${table.comment!} swagger接口描述文件
    * </p>
*
* @author ${author}
* @since ${date}
*/
@Api(tags = "${entity}管理接口")
@Validated
public interface ${table.controllerName}Swagger {

    @ApiOperation(value = "新增一个${entity}实例")
    ${entity} add${entity}(@Validated ${entity} ${entity?uncap_first});

    @ApiOperation(value = "修改一个${entity}实例")
    ${entity} update${entity}(@Validated ${entity} ${entity?uncap_first});

    @ApiOperation(value = "获取所有${entity}实例")
    List<${entity}> selectAll${entity}();

<#list table.fields as field>
    <#if field.keyFlag>
    @ApiOperation(value = "根据主键删除一个${entity}实例")
    void delete${entity}By${field.propertyName?cap_first}(@NotBlank  ${field.propertyType} ${field.propertyName});

    @ApiOperation(value = "根据主键获取${entity}实例")
    ${entity} select${entity}By${field.propertyName?cap_first}(@NotBlank  ${field.propertyType} ${field.propertyName});
    </#if>
</#list>

    @ApiOperation(value = "根据例子获取${entity}实例")
    List<${entity}> selectLogsByExample(${entity} ${entity?uncap_first});

    @ApiOperation(value = "分页获取${entity}实体")
    Page<${entity}> select${entity}Pageable(Page page);

    @ApiOperation(value = "根据例子分页获取${entity}实例")
    Page<${entity}> select${entity}sByExamplePageable(Page<${entity}> page, ${entity} ${entity?uncap_first});

}

